package com.study.demo04;

import com.study.demo02.UserService;
import com.study.demo02.UserServiceImpl;

public class Client {
    public static void main(String[] args) {
        //真实对象
        UserServiceImpl userService = new UserServiceImpl();

        //代理对象,暂时没有
        Proxy3 proxy3 = new Proxy3();

        //设置要代理的对象
        proxy3.setTarget(userService);

        //动态生成代理对象
        UserService proxy = (UserService) proxy3.getProxy();
        proxy.add();
    }
}
